#ifndef RESULTERROR_H
#define RESULTERROR_H

#include <QString>

class ResultError
{
public:
    explicit ResultError (const QString& text, int code = 0);
    explicit ResultError();

    bool isValid() const;
    int code() const;
    QString text() const;
    void setError (const QString& text, int code = 0);

private:
    QString m_errorText;
    int m_errorCode;
    bool m_isValid;
};

#ifndef QT_NO_DEBUG
QDebug operator<< (QDebug debug, const ResultError& error);
#endif

#endif // RESULTERROR_H
